/*
 * @Author: “ygnnli” “1585923072@qq.com”
 * @Date: 2024-08-08 17:43:14
 * @LastEditors: “ygnnli” “1585923072@qq.com”
 * @LastEditTime: 2024-08-09 10:00:39
 * @FilePath: /82/SelectServer/SelectServerMain.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

#include <memory>
#include "Log.hpp"
#include "EpollServer.hpp"

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        std::cout << "usage: " << argv[0] << " port" << std::endl;
        return 0;
    }
    uint16_t port = std::stoi(argv[1]);

    EnableScreen(); // 开启屏幕输出
    std::unique_ptr<EpollServer> svr = std::make_unique<EpollServer>(port);
    svr->Loop(); // 启动服务器

    return 0;
}